import { createStore, createLogger } from 'vuex'

export default createStore({
  state: {
    user: {
      isLogin: false,
      token: '',
      avator: '',
      nickname: ''
    }
  },
  mutations: {
    setUser(state, payload) {
      state.user = Object.assign({}, state.user, payload)
    }
  },
  actions: {
  },
  modules: {
  },
  plugins: [createLogger()]
})
